#ifndef BODY_H
#define BODY_H

#include <stdio.h>

// store mass in last element of pos
typedef struct bodyList
{
	float4* pos;
	float4* vel;
	int size;
	int capacity;
	bool pinned;
} bodyList;

void freeBodyList(bodyList* bl);

//read positions and velocities
bodyList* readBodyList();
bodyList* readBodyList(const char* filename);
bodyList* readBodyList(FILE* stream);

void writeBodyList(bodyList* bl);
void writeBodyList(bodyList* bl, const char* filename);
void writeBodyList(bodyList* bl, FILE* stream);

void convertPinnedBodyList(bodyList* bl);

#endif
